package com.wmapp.service;

import java.util.List;

import com.wmapp.domain.Administrator;
import com.wmapp.domain.SipAccount;
import com.wmapp.domain.BroadcastClient;
import com.wmapp.domain.CallDetail;
import com.wmapp.domain.ConfLayout;
import com.wmapp.domain.ConfMessage;
import com.wmapp.domain.ConfParticipant;
import com.wmapp.domain.ConfProfile;
import com.wmapp.domain.ConfReservation;
import com.wmapp.domain.Conference;
import com.wmapp.domain.ConferenceStatus;
import com.wmapp.domain.MCU;
import com.wmapp.domain.Participant;
import com.wmapp.domain.ParticipantGroup;

public interface ManagerService {
	// ------------MCU-------------
	List<MCU> queryMCUList();
	
	void addMCU(MCU mcu);
	
	MCU getMCUByName(String name);
	
	boolean isNameExist(String name);
	
	void removeMCU(String id);
	
	MCU getMCUById(String id);
	
	void modifyMCU(MCU mcu);
	
	// ------------administrator-------------
	void addAdmin(Administrator admin);
	/**
	 * Query administrator list
	 * @return
	 */
	List<Administrator> queryAdminList();
	/**
	 * remove administrator by names
	 * @param names
	 */
	void removeAdmin(String names);
	
	void modifyAdmin(Administrator admin);
	
	Administrator getAdminByName(String name);
	
	boolean isAdminNameExist(String name);

    // ------------sip account-------------
	void addSip(SipAccount sipAccount);
	/**
	 * Query sip account list
	 * @return
	 */
	List<SipAccount> querySipList();
	/**
	 * remove administrator by names
	 * @param names
	 */
	void removeSip(String names);

	void modifySip(SipAccount sipAccount);

	SipAccount getSipByName(String name);

	boolean isSipNameExist(String name);
	
	//------------------ participant group -----------
	void addParticipantGroup(ParticipantGroup domain);

	List<ParticipantGroup> queryParticipantGroupList();

	void removeParticipantGroup(String key);
	
	void modifyParticipantGroup(ParticipantGroup domain);
	
	ParticipantGroup getParticipantGroupByName(String name);
	
	boolean isParticipantGroupNameExist(String name);
	
	//---------------Participant------------------
	void addParticipant(Participant domain);

	List<Participant> queryParticipantList();

	void removeParticipant(String key);
	
	void modifyParticipant(Participant domain);
	
	Participant getParticipantByKey(String key);
	
	boolean isParticipantExist(String key);
	//---------------ConfProfile------------------
	void addConfProfile(ConfProfile domain);

	List<ConfProfile> queryConfProfileList();

	void removeConfProfile(String key);
	
	void modifyConfProfile(ConfProfile domain);
	
	ConfProfile getConfProfileByKey(String key);
	
	boolean isConfProfileExist(String key);
	//---------------Conference------------------
	void addConference(Conference domain);

	List<Conference> queryConferenceList();

	void removeConference(String key);
    void pauseConference(String key);
    void restartConference(String key);
	
	void modifyConference(Conference domain);
	
	Conference getConferenceByKey(String key);
	
	boolean isConferenceExist(String key);
	
	ConferenceStatus getConfStatus(String number);
	
	void saveCoustomLayout(ConfLayout confLayout);
	
	void autoLayout(String number);
	
	void sendMessage(ConfMessage confMessage);
	
	void hangUpCalls(String confNumber,String[] calls);
    void inviteParticipants(String confNumber,String[] calls); // 邀请会议与会者加入会议����
	/**
	 * Mute or cancel mute calls
	 * @param confNumber
	 * @param calls
	 * @param mute
	 */
	void muteCalls(String confNumber,String[] calls,boolean mute);
	
	/**
	 * Specify or cancel conference lecture
	 * @param confNumber
	 * @param callId
	 * @param cancel
	 */
	void specifyLecture(String confNumber,String callId,boolean cancel);
	
	CallDetail fetchCallDetail(String confNumber,String callId);
	/**
	 * Invite callers
	 * @param confNumber
	 * @param participants
	 */
	void inviteCalls(String confNumber,List<ConfParticipant> participants);
	
	/**
	 * Query conference broadcast clients
	 * @param confNumber
	 * @return
	 */
	List<BroadcastClient> queryBroadcastClients(String confNumber);
	
	//------------ Conference Reservation ------------------
	List<ConfReservation> queryConfReservations();
	
	void addConfReservation(ConfReservation reservation);
	
	void updateConfReservation(ConfReservation reservation);
	
	ConfReservation getConfReservation(String id);
	
	void removeConfReservation(String id);
}
